package com.whq.thrift.api.kafka.requestlog.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.thrift.api.kafka.requestlog.db.RequestLog;
import com.whq.thrift.api.kafka.requestlog.db.RequestLogMapper;
import com.whq.thrift.api.kafka.requestlog.service.RequestLogService;

@Service
public class RequestLogServiceImpl implements RequestLogService{
	
	@Autowired
	RequestLogMapper requestLogMapper;

	public void addRequestLog(RequestLog requestLog) {
		if (requestLog == null) {
			return;
		}
		requestLogMapper.addRecord(requestLog);
	}

	public void delRequestLogsByBeforeTime(int tableSeq, Date time) {
		requestLogMapper.delRecordsByTimeBefore(tableSeq, time);
	}

}
